{% extends "base.html" %}

{% block title %}编辑个人资料{% endblock %}

{% block content %}
<h2 class="mb-3 form-container">编辑个人资料</h2>
<div class="container mt-5">
    <form action="/profile" method="post">
    <div class="mb-3 form-container">
        <label for="username" class="form-label">用户名 (不可修改)</label>
        <input type="text" id="username" class="form-control" name="username" value="{{ user.username }}" readonly>
    </div>
    <div class="mb-3 form-container">
        <label for="email" class="form-label">电子邮箱</label>
        <input type="email" class="form-control" id="email" name="email" value="{{ user.email }}">
    </div>
    <div class="mb-3 form-container">
        <label for="password" class="form-label">新密码 (至少8位，包含两种字符类型)</label>
        <input type="password" class="form-control " id="password" name="password">
    </div>
    <div class="mb-3 form-container">
        <label for="confirm_password" class="form-label">确认新密码</label>
        <input type="password" class="form-control " id="confirm_password" name="confirm_password">
    </div>
    <div class="mb-3 form-container">
        <button type="submit" class="btn btn-primary w-100">保存更改</button>
    </div>
</form>
</div>
{% endblock %}
